package io.rong.messages;

import io.rong.util.GsonUtil;

/**
 * @Author:xinkai.xu
 * @Date:2018/1/12 19:01
 * @Description:群组消息
 */
public class GroupCnfMessage extends BaseMessage {
    //	{"operatorUserId":"4324","operation":"Rename",
    // "data":"{\"operatorNickname\":\"李天\",\"targetGroupName\":\"群名\"}",
    // "message":"修改本群名为本地生活","extra":""}
    private String operatorUserId = "";//操作人用户 Id
    private String operation = "";//operation 为操作名
    private String data = "";//data 为操作数据
    private String message = "";//message 为消息内容
    private String extra = "";
    private transient static final String TYPE = "RC:GrpNtf";

    public GroupCnfMessage(String operatorUserId, String operation, String data, String message, String extra) {
        this.operatorUserId = operatorUserId;
        this.operation = operation;
        this.data = data;
        this.message = message;
        this.extra = extra;
    }

    public String getOperatorUserId() {
        return operatorUserId;
    }

    public void setOperatorUserId(String operatorUserId) {
        this.operatorUserId = operatorUserId;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    @Override
    public String getType() {
        return TYPE;
    }

    @Override
    public String toString() {
        return GsonUtil.toJson(this, GroupCnfMessage.class);
    }
}
